import React from "react";
import { Link } from "react-router";

import { News } from "./NewsPage.jsx";

class LatestNews extends React.Component {
    render() {
        const newsList = this.props.data || [];

        return <div className={ "list " + this.props.className }>
                   <div className="header">
                       <span className="title">最新消息</span>
                       <span className="description">Latest news</span>
                       <span className="fr"><Link>更多</Link></span>
                   </div>
                   {
                        newsList.map((item, i) => <News key={i} data={item} />)
                   }
               </div>
    }
}

export default LatestNews;